#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0;
	while (scanf("%d", &n) != EOF)
	{
		double sum = 2 * n + n * (n - 1) * 3 / 2.0;
		printf("%.0lf\n", sum);
	}
	return 0;
}